package com.edu.app.mapper.linkmappers;

import com.edu.app.bean.linkbeans.SysContractLesson;
import com.edu.app.util.AppBaseMapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

@Component
public interface SysContractLessonMapper extends AppBaseMapper<SysContractLesson> {
    //注：传参数到Mapper层，当参数超过两个以上的时候，注意使用@Param标注
    @Select("SELECT * FROM S_CONTRACT_LESSON WHERE contract_id = #{contract_id} and lesson_id = #{lesson_id}")
    SysContractLesson getCustomerActivity(@Param("contract_id") Integer contract_id, @Param("lesson_id") Integer lesson_id);

    @Select("DELETE FROM S_CONTRACT_LESSON WHERE contract_id = #{contract_id}")
    Integer deleteContractLessonByContractId(Integer contract_id);

    @Select("DELETE FROM S_CONTRACT_LESSON WHERE lesson_id = #{lesson_id}")
    Integer deleteContractLessonByLessonId(Integer lesson_id);


}
